﻿@model GitCandy.Models.ContributorsModel

@{
    ViewBag.Title = string.Format(SR.Shared_TitleFormat, string.Format(SR.Repository_ContributorsTitle, Model));
}

<h4>@string.Format(SR.Repository_ContributorsTitle, "") @Html.ActionLink(Model.RepositoryName, "Tree", Html.OverRoute(new { path = "" }))</h4>

<div class="span5">
    @foreach (var item in Model.Contributors)
    {
        <div class="row">
            <div class="border-area">
                <div>@item.Author</div>
                <div>@item.CommitsCount @SR.Repository_Commits</div>
            </div>
        </div>
    }
</div>
<div class="span5 offset1 pull-right">
    <table class="table">
        <caption>@SR.Repository_Statistics</caption>
        <tbody>
            @if (Model.Statistics.Default != null)
            {
                <tr><td>@SR.Repository_DefaultBranch</td><td>@Model.Statistics.Default.Branch</td></tr>
                <tr><td>@SR.Repository_DefaultCommits</td><td>@Model.Statistics.Default.Commits</td></tr>
                <tr><td>@SR.Repository_DefaultContributors</td><td>@Model.Statistics.Default.Contributors</td></tr>
                <tr><td>@SR.Repository_DefaultFiles</td><td>@Model.Statistics.Default.Files</td></tr>
                <tr><td>@SR.Repository_DefaultSourceSize</td><td>@FileHelper.GetSizeString(Model.Statistics.Default.SourceSize)</td></tr>
                <tr><td></td><td></td></tr>
            }
            <tr><td>@SR.Repository_CurrentBranch</td><td>@Model.Statistics.Current.Branch</td></tr>
            <tr><td>@SR.Repository_CurrentCommits</td><td>@Model.Statistics.Current.Commits</td></tr>
            <tr><td>@SR.Repository_CurrentContributors</td><td>@Model.Statistics.Current.Contributors</td></tr>
            <tr><td>@SR.Repository_CurrentFiles</td><td>@Model.Statistics.Current.Files</td></tr>
            <tr><td>@SR.Repository_CurrentSourceSize</td><td>@FileHelper.GetSizeString(Model.Statistics.Current.SourceSize)</td></tr>
            <tr><td></td><td></td></tr>
            <tr><td>@SR.Repository_RepositorySize</td><td>@FileHelper.GetSizeString(Model.Statistics.RepositorySize)</td></tr>
        </tbody>
    </table>
</div>
